﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ESRI.ArcGIS.Controls;
using ESRI.ArcGIS.Carto;

namespace DIWAGIS.Class
{
    class ClassVariables
    {
        //Set value color and size font Label
        public static int labelRed = 0;
        public static int labelGreen = 0;
        public static int labelBlue = 0;
        public static int labelSize = 0;
        public static bool labelBold = false;
        public static bool labelItalic = false;
        public static string labelFont = "Segoe UI";
        public static string wDongHoKhachHang = "wDongHoKhachHang";
        public static string fcOngChinh = "fcOngChinh";
        public static string wOngChinh = "wOngChinh";
        public static string wOngPhanPhoi = "wOngPhanPhoi";
        public static string wOngTruyenDan = "wOngTruyenDan";
        public static string wOngNhanh = "wOngNhanh";
        public static string wTruCuuHoa = "wTruCuuHoa";
        public static string wDongHoTong = "wDongHoTong";
        public static string wVanDieuKhien = "wVanDieuKhien";
        public static string wVan = "wVan";
        public static string wVanHeThong = "wVanHeThong";
        public static string wVanKhachHang = "wVanKhachHang";

        public static string tbTaiLieu_DongHoKhachHang = "TaiLieu_DongHoKhachHang";
        public static string tbTaiLieu_OngPhanPhoi = "TaiLieu_OngPhanPhoi";
        public static string lyrThua = "Thua";
        //Set value Mapcontrol
        public static IMap f_MapControl;
        public static string tbSLNuocKhachHang = "SanLuongNuocKhachHang";

        /// <summary>
        /// Lưu trữ thông tin đăng nhập tới server
        /// </summary>
        public static class ThongTinDangNhap
        {
            public static string strServerName = "NVLOC-PC";
            public static string strInstance = "sde:sqlserver:NVLOC-PC\\sql2008";
            public static string strDatabase = "watergis";
            public static string strUser = "sde";
            public static string strPassword = "Abc@123";
            public static string strVersion = "sde.DEFAULT";


        }

        /// <summary>
        /// Khai báo lớp bản đồ
        /// </summary>
        public static class LopBanDo
        {
            public static ILayer lyrDuongOngChinh;
            public static ILayer lyrOngLong;
            public static ILayer lyrDuongOngNhanh;
            public static ILayer lyrDongHoKH;
            public static ILayer lyrDongHoTong;
            public static ILayer lyrBeChua;
            public static ILayer lyrDatalogger;
            public static ILayer lyrDiemDauNoi;
            public static ILayer lyrGieng;
            public static ILayer lyrGiamSatChatLuongNuoc;
            public static ILayer lyrHamVan;
            public static ILayer lyrKhuVucCapNuoc;
            public static ILayer lyrMayBom;
            public static ILayer lyrNhaMayNuoc;
            public static ILayer lyrDiemSuCo;
            public static ILayer lyrThapCatAp;
            public static ILayer lyrThuyDai;
            public static ILayer lyrTruCuuHoa;
            public static ILayer lyrVanDieuKhien;
            public static ILayer lyrVanHeThong;
            public static ILayer lyrVoiCongCong;
            public static ILayer lyrTramBom;
            public static ILayer lyrVungCapNuoc;
        }
        public class aFuction
        {
            public static bool Islentext(string pValue, int pLim)
            {
                if (pValue.Length > pLim) return false;
                else return true;
            }

            public static bool IsNumberInt(string pValue)
            {
                foreach (Char c in pValue)
                {
                    if (!Char.IsDigit(c))
                        return false;
                }
                return true;
            }
        }
    }
}